﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DevExpress.Xpo;
using ChuanPlus;
namespace ChuanPlus.DAO
{
    class TransactionTypeDAO
    {
        public static TransactionType GetByName(string name)
        {            
            XPQuery<TransactionType> transactionType = new XPQuery<TransactionType>(Session.DefaultSession);
            var list = (from t in transactionType
                       where t.TransactionName.Contains(name)
                       select t).First();           
            return list;
        }
    }
}
